package zara


/**
 * User domain class.
 */
class User {
	static transients = ['pass']
	static hasMany = [authorities: Role]
	static belongsTo = Role

	/** Username */
	String username
	/** User Real Name*/
	String userRealName = ''
	/** MD5 Password */
	String passwd
	/** enabled */
	boolean enabled

	String email
	boolean emailShow

    boolean vip = false

	/** description */
	String description = ''

	/** plain password to create a MD5 password */
	String pass = '[secret]'

    String realPass = ''

    Integer siteTotal = 0

    Integer total = 0 // 用户积分

	static constraints = {
		username(blank: false, unique: true)
		userRealName(blank: true,nullable:true)
		passwd(blank: false)
        realPass(blank: false)
		enabled()
        siteTotal()
        total()
        vip()
	}
}
